﻿* Encoding: UTF-8.

*load the data (add the file path below)

GET FILE=' '
DATASET NAME data_pilot1 WINDOW=FRONT.

* get sample information

DATASET ACTIVATE data_pilot1.
DESCRIPTIVES VARIABLES=age ideology_num
  /STATISTICS=MEAN STDDEV MIN MAX.

FREQUENCIES VARIABLES=ideology_cat income_cat income_num gender inequality
  /ORDER=ANALYSIS.

* RM-ANOVA analysis and pairwise comparisons (IncomeGroup: 1 = perception_R & 2 = perception_P)

DATASET ACTIVATE data_pilot1.
GLM perception_R perception_P BY inequality
  /WSFACTOR=IncomeGroup 2 Polynomial 
  /METHOD=SSTYPE(3)
  /EMMEANS=TABLES(inequality*IncomeGroup) COMPARE(inequality) ADJ(LSD)
  /EMMEANS=TABLES(inequality*IncomeGroup) COMPARE(IncomeGroup) ADJ(LSD)
  /PRINT=DESCRIPTIVE ETASQ 
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=IncomeGroup
  /DESIGN=inequality.

*check whether there is a significant gender difference

DATASET ACTIVATE data_pilot1.
GLM perception_R perception_P BY inequality gender
  /WSFACTOR=IncomeGroup 2 Polynomial 
  /METHOD=SSTYPE(3)
  /PRINT=DESCRIPTIVE ETASQ 
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=IncomeGroup 
  /DESIGN=inequality gender inequality*gender.
